elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  Error: Unvalid reference to
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: 1 [2] Ir Abajo Respuesta Imprimir
Autor Tema: Error: Unvalid reference to  (Leído 4,095 veces)
DeIMachine

Desconectado Desconectado

Mensajes: 41


Ver Perfil
Re: Error: Unvalid reference to
« Respuesta #10 en: 29 Noviembre 2015, 21:38 pm »

Compilando desde consola me salta este error:
https://gyazo.com/6537c560794c390e48b400f9e4bc0842
En el makefile del workspace me pone esto:
.PHONY: clean All

All:
   @echo "----------Building project:[ ModHerramientas - Debug ]----------"
   @cd "ModHerramientas" && "$(MAKE)" -f  "ModHerramientas.mk"
clean:
   @echo "----------Cleaning project:[ ModHerramientas - Debug ]----------"
   @cd "ModHerramientas" && "$(MAKE)" -f  "ModHerramientas.mk" clean
Y este es el mk de herramientas project:
##
## Auto Generated makefile by CodeLite IDE
## any manual changes will be erased      
##
## Debug
ProjectName            :=ModHerramientas
ConfigurationName      :=Debug
WorkspacePath          := "C:\Users\Guillermo\Desktop\trabajos"
ProjectPath            := "C:\Users\Guillermo\Desktop\trabajos\ModHerramientas"
IntermediateDirectory  :=./Debug
OutDir                 := $(IntermediateDirectory)
CurrentFileName        :=
CurrentFilePath        :=
CurrentFileFullPath    :=
User                   :=Guillermo
Date                   :=29/11/2015
CodeLitePath           :="C:\Program Files\CodeLite"
LinkerName             :=g++
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix           :=.o
DependSuffix           :=.o.d
PreprocessSuffix       :=.o.i
DebugSwitch            :=-gstab
IncludeSwitch          :=-I
LibrarySwitch          :=-l
OutputSwitch           :=-o
LibraryPathSwitch      :=-L
PreprocessorSwitch     :=-D
SourceSwitch           :=-c
OutputFile             :=$(IntermediateDirectory)/$(ProjectName)
Preprocessors          :=
ObjectSwitch           :=-o
ArchiveOutputSwitch    :=
PreprocessOnlySwitch   :=-E
ObjectsFileList        :="ModHerramientas.txt"
PCHCompileFlags        :=
MakeDirCommand         :=makedir
RcCmpOptions           :=
RcCompilerName         :=windres
LinkOptions            :=  
IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch).
IncludePCH             :=
RcIncludePath          :=
Libs                   :=
ArLibs                 :=  
LibPath                := $(LibraryPathSwitch).

##
## Common variables
## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
##
AR       := ar rcus
CXX      := g++
CC       := gcc
CXXFLAGS :=  -g -O0 -Wall $(Preprocessors)
CFLAGS   :=  -g -O0 -Wall $(Preprocessors)
ASFLAGS  :=
AS       := as


##
## User defined environment variables
##
CodeLiteDir:=C:\Program Files\CodeLite
Objects0=$(IntermediateDirectory)/herramientas.cpp$(ObjectSuffix) $(IntermediateDirectory)/main.cpp$(ObjectSuffix)



Objects=$(Objects0)

##
## Main Build Targets
##
.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs
all: $(OutputFile)

$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
   @$(MakeDirCommand) $(@D)
   @echo "" > $(IntermediateDirectory)/.d
   @echo $(Objects0)  > $(ObjectsFileList)
   $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)

MakeIntermediateDirs:
   @$(MakeDirCommand) "./Debug"


$(IntermediateDirectory)/.d:
   @$(MakeDirCommand) "./Debug"

PreBuild:


##
## Objects
##
$(IntermediateDirectory)/herramientas.cpp$(ObjectSuffix): herramientas.cpp $(IntermediateDirectory)/herramientas.cpp$(DependSuffix)
   $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Guillermo/Desktop/trabajos/ModHerramientas/herramientas.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/herramientas.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/herramientas.cpp$(DependSuffix): herramientas.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/herramientas.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/herramientas.cpp$(DependSuffix) -MM "herramientas.cpp"

$(IntermediateDirectory)/herramientas.cpp$(PreprocessSuffix): herramientas.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/herramientas.cpp$(PreprocessSuffix) "herramientas.cpp"

$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix)
   $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Guillermo/Desktop/trabajos/ModHerramientas/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM "main.cpp"

$(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) "main.cpp"


-include $(IntermediateDirectory)/*$(DependSuffix)
##
## Clean
##
clean:
   $(RM) -r ./Debug/

El de tiempo:
##
## Auto Generated makefile by CodeLite IDE
## any manual changes will be erased      
##
## Debug
ProjectName            :=ModTiempo
ConfigurationName      :=Debug
WorkspacePath          := "C:\Users\Guillermo\Desktop\trabajos"
ProjectPath            := "C:\Users\Guillermo\Desktop\trabajos\ModTiempo"
IntermediateDirectory  :=./Debug
OutDir                 := $(IntermediateDirectory)
CurrentFileName        :=
CurrentFilePath        :=
CurrentFileFullPath    :=
User                   :=Guillermo
Date                   :=29/11/2015
CodeLitePath           :="C:\Program Files\CodeLite"
LinkerName             :=g++
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix           :=.o
DependSuffix           :=.o.d
PreprocessSuffix       :=.o.i
DebugSwitch            :=-gstab
IncludeSwitch          :=-I
LibrarySwitch          :=-l
OutputSwitch           :=-o
LibraryPathSwitch      :=-L
PreprocessorSwitch     :=-D
SourceSwitch           :=-c
OutputFile             :=$(IntermediateDirectory)/$(ProjectName)
Preprocessors          :=
ObjectSwitch           :=-o
ArchiveOutputSwitch    :=
PreprocessOnlySwitch   :=-E
ObjectsFileList        :="ModTiempo.txt"
PCHCompileFlags        :=
MakeDirCommand         :=makedir
RcCmpOptions           :=
RcCompilerName         :=windres
LinkOptions            :=  
IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch).
IncludePCH             :=
RcIncludePath          :=
Libs                   :=
ArLibs                 :=  
LibPath                := $(LibraryPathSwitch).

##
## Common variables
## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
##
AR       := ar rcus
CXX      := g++
CC       := gcc
CXXFLAGS :=  -g -O0 -Wall $(Preprocessors)
CFLAGS   :=  -g -O0 -Wall $(Preprocessors)
ASFLAGS  :=
AS       := as


##
## User defined environment variables
##
CodeLiteDir:=C:\Program Files\CodeLite
Objects0=$(IntermediateDirectory)/tiempo.cpp$(ObjectSuffix)



Objects=$(Objects0)

##
## Main Build Targets
##
.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs
all: $(OutputFile)

$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
   @$(MakeDirCommand) $(@D)
   @echo "" > $(IntermediateDirectory)/.d
   @echo $(Objects0)  > $(ObjectsFileList)
   $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)

MakeIntermediateDirs:
   @$(MakeDirCommand) "./Debug"


$(IntermediateDirectory)/.d:
   @$(MakeDirCommand) "./Debug"

PreBuild:


##
## Objects
##
$(IntermediateDirectory)/tiempo.cpp$(ObjectSuffix): tiempo.cpp $(IntermediateDirectory)/tiempo.cpp$(DependSuffix)
   $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Guillermo/Desktop/trabajos/ModTiempo/tiempo.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/tiempo.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/tiempo.cpp$(DependSuffix): tiempo.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/tiempo.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/tiempo.cpp$(DependSuffix) -MM "tiempo.cpp"

$(IntermediateDirectory)/tiempo.cpp$(PreprocessSuffix): tiempo.cpp
   @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/tiempo.cpp$(PreprocessSuffix) "tiempo.cpp"


-include $(IntermediateDirectory)/*$(DependSuffix)
##
## Clean
##
clean:
   $(RM) -r ./Debug/




« Última modificación: 29 Noviembre 2015, 21:46 pm por DeIMachine » En línea

La tradición es la mortaja de la sabiduría.
ivancea96


Desconectado Desconectado

Mensajes: 3.412


ASMático


Ver Perfil WWW
Re: Error: Unvalid reference to
« Respuesta #11 en: 29 Noviembre 2015, 21:43 pm »

¿Tienes la librería agregada al proyecto?


En línea

DeIMachine

Desconectado Desconectado

Mensajes: 41


Ver Perfil
Re: Error: Unvalid reference to
« Respuesta #12 en: 29 Noviembre 2015, 21:47 pm »

He pasado lo que acabo de compilar en consola arriba, tengo dos proyectos distintos pero la libreria de una la uso en otro, hay algun problema en eso??
El proyecto modtiempo y modherramientas estan en la misma carpeta, con utilizar esto en el modulo de herrmientas debería de bastar no??
#include "../ModTiempo/tiempo.h"
« Última modificación: 29 Noviembre 2015, 22:02 pm por DeIMachine » En línea

La tradición es la mortaja de la sabiduría.
Páginas: 1 [2] Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines