Click here to Skip to main content
15,890,185 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple includes Pin
Richard MacCutchan30-Aug-10 2:39
mveRichard MacCutchan30-Aug-10 2:39 
GeneralRe: Multiple includes Pin
Paul Michalik30-Aug-10 9:42
Paul Michalik30-Aug-10 9:42 
GeneralRe: Multiple includes Pin
Richard MacCutchan30-Aug-10 21:50
mveRichard MacCutchan30-Aug-10 21:50 
GeneralRe: Multiple includes Pin
Paul Michalik30-Aug-10 23:30
Paul Michalik30-Aug-10 23:30 
GeneralRe: Multiple includes Pin
Richard MacCutchan31-Aug-10 0:41
mveRichard MacCutchan31-Aug-10 0:41 
GeneralRe: Multiple includes Pin
Shy Agam30-Aug-10 21:20
Shy Agam30-Aug-10 21:20 
GeneralRe: Multiple includes Pin
Emilio Garavaglia30-Aug-10 20:18
Emilio Garavaglia30-Aug-10 20:18 
AnswerRe: Multiple includes [modified] Pin
Shy Agam30-Aug-10 22:45
Shy Agam30-Aug-10 22:45 
It appears you guys were right. This is a linker issue.
Eclipse lets you specify a reference to your other project.
Being a devoted Visual Studio for .NET developer, I guess I assumed adding the reference was suffice.

However, I've found the specific settings needed for linking the library.

For future references to this post:
1. Open the project's settings.
2. Expand "C/C++ Build" and select "Settings".
3. Under "Tool Settings" expand "GCC C++ Linker" and select "Libraries".
4. Add the name of the library on the top box, and the path to its files on the bottom one.
(Note that the path to the library should be the project's Debug directory)


So now the project gets compiled, and the linker no longer whines about not finding the library.
However I get some new linking errors.
The new console output is as follows:

make all
Building target: Maple
Invoking: GCC C++ Linker
g++ -L"/LibraryPath/Debug" -o"Maple" ./Source/Maple.o -lCursesPlus
/LibraryPath/Debug/libCursesPlus.so: undefined reference to `CursesPlus::CursesPlusEngine::initialized'
.
.
.
collect2: ld returned 1 exit status
make: *** [Maple] Error 1



The vertical three dots hold place for a series of "undefined reference to..." errors, which are similar to the first error, but specify a different member of CursesPlusEngine.

And to make it clear: Maple is my main executable project, and libCursesPlus is my library project.

--Edit--
All of the above members are defined as private static in their corresponding header files.

modified on Tuesday, August 31, 2010 4:56 AM

GeneralRe: Multiple includes Pin
Paul Michalik30-Aug-10 23:49
Paul Michalik30-Aug-10 23:49 
GeneralRe: Multiple includes Pin
Shy Agam30-Aug-10 23:50
Shy Agam30-Aug-10 23:50 
GeneralRe: Multiple includes Pin
Aescleal31-Aug-10 0:30
Aescleal31-Aug-10 0:30 
GeneralRe: Multiple includes Pin
Tim Craig31-Aug-10 8:59
Tim Craig31-Aug-10 8:59 
GeneralRe: Multiple includes Pin
Aescleal31-Aug-10 9:13
Aescleal31-Aug-10 9:13 
GeneralRe: Multiple includes Pin
Paul Michalik31-Aug-10 12:35
Paul Michalik31-Aug-10 12:35 
GeneralRe: Multiple includes Pin
Tim Craig31-Aug-10 13:12
Tim Craig31-Aug-10 13:12 
GeneralRe: Multiple includes Pin
Paul Michalik31-Aug-10 21:29
Paul Michalik31-Aug-10 21:29 
GeneralRe: Multiple includes [modified] Pin
Paul Michalik31-Aug-10 6:28
Paul Michalik31-Aug-10 6:28 
GeneralRe: Multiple includes Pin
Shy Agam31-Aug-10 21:27
Shy Agam31-Aug-10 21:27 
GeneralRe: Multiple includes Pin
Paul Michalik31-Aug-10 23:57
Paul Michalik31-Aug-10 23:57 
GeneralRe: Multiple includes Pin
Shy Agam1-Sep-10 2:13
Shy Agam1-Sep-10 2:13 
QuestionIs there any difference in drawing emf on CDC and Bitmap? Pin
Sameerkumar Namdeo29-Aug-10 21:46
Sameerkumar Namdeo29-Aug-10 21:46 
Questionhow to find memory leaks in attached dll Pin
ganesh.dp29-Aug-10 20:02
ganesh.dp29-Aug-10 20:02 
AnswerRe: how to find memory leaks in attached dll Pin
Eugen Podsypalnikov29-Aug-10 20:18
Eugen Podsypalnikov29-Aug-10 20:18 
AnswerRe: how to find memory leaks in attached dll PinPopular
Niklas L29-Aug-10 20:41
Niklas L29-Aug-10 20:41 
AnswerRe: how to find memory leaks in attached dll Pin
ThatsAlok29-Aug-10 20:54
ThatsAlok29-Aug-10 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.