Forum Replies Created
-
AuthorPosts
-
October 17, 2016 at 17:05 in reply to: Undefined reference to function / Cannot detect target name #9289larrymccutchanParticipant
I tried recreating a new project from scratch.The problem did not present itself when creating the new project when creating the project.
However, it did present itself as soon as I add a library dependency using the Visual Studio’s “Build Depedencies->Project Dependencies”. The problem comes from adding a dependency to the project.
The build output without the dependency was:
1>—— Build started: Project: SystemControl, Configuration: CrossComp Win32 ——
1> VisualGDB: Sending 10 updated source files to build machine…
1> VisualGDB: Run “make CONFIG=CrossComp” in directory “/tmp/VisualGDB/c/tfs/Frankenstation/src/SystemControl” on lam@localbuildhost (SSH)
1> mkdir CrossComp
1> g++ -ggdb -ffunction-sections -O0 -DDEBUG=1 -c main.cpp -o CrossComp/main.o -MD -MF CrossComp/main.dep
1> g++ -o CrossComp/SystemControl -Wl,-gc-sections -Wl,–start-group CrossComp/main.o -Wl,–rpath=’$ORIGIN’ -Wl,–end-group
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========The build output with the dependency is:
1>—— Rebuild All started: Project: SystemControl, Configuration: LinuxDebug Win32 ——
1> VisualGDB: Run “make CONFIG=LinuxDebug clean” in directory “Frankenstation/src/SystemControl” on lam@localbuildhost (SSH)
1> rm -rf LinuxDebug
1> rm -rf cg
1>VisualGDB : warning : Cannot detect target name for: C:\tfs\Frankenstation\src\SystemControl\Makefile
1> VisualGDB: Sending 10 updated source files to build machine…
1> VisualGDB: Run “make CONFIG=LinuxDebug” in directory “Frankenstation/src/SystemControl” on lam@localbuildhost (SSH)
1> mkdir LinuxDebug
1> g++ -std=c++14 -ggdb -ffunction-sections -O0 -I../include -I../Framework/include -I../Framework/cg -DDEBUG=1 -DUSE_SIM=1 -c main.cpp -o LinuxDebug/main.o -MD -MF LinuxDebug/main.dep
1> g++ -o LinuxDebug/SystemControl -static-libstdc++ -L/usr/local/lib -Wl,–start-group LinuxDebug/main.o -lboost_system -lboost_date_time -lpthread ../Framework/LinuxDebug/libframework.a -Wl,–rpath=’$ORIGIN’ -Wl,–rpath=’$ORIGIN/../../Framework/LinuxDebug/’ -Wl,–end-group
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========October 12, 2016 at 15:49 in reply to: Undefined reference to function / Cannot detect target name #9268larrymccutchanParticipantI have the same problem with “Cannot detect target name for “…. Makefile”
The makefile was generated by VisualGDB but was modified. I can paste a copy of the full make file if it helps. Otherwise, here is the first few lines that demonstrate the setting of the TARGETNAME.
<< Makefile insert >>
#Generated by VisualGDB project wizard.
#Note: VisualGDB will automatically update this file when you add new sources to the project.
#All other changes you make in this file will be preserved.
#Visit http://visualgdb.com/makefiles for more details#VisualGDB: AutoSourceFiles #<— remove this line to disable auto-updating of SOURCEFILES and EXTERNAL_LIBS
TARGETNAME := SyringeManager
#TARGETTYPE can be APP, STATIC or SHARED
TARGETTYPE := APP -
AuthorPosts