Using a Precompiled Library [message #88904] |
Thu, 11 December 2003 11:15  |
Eclipse User |
|
|
|
Originally posted by: mbildner.hotmail.com
I'm trying to setup a C++ project for a class project that I'm working on.
I have a set of files (stored in C:\eclipse\workspace\proj1) that use
classes from a library. The source code to the library is stored in
C:\archlib. I also have access to the precompiled library, which is located
at C:\compArchlib\lib2-5a.a.
What would be the easiest way to get my project to reference the library, so
that it can be built and run?
Thanks for the help.
Michael
|
|
|
|
|
|
|
|
|
Re: Using a Precompiled Library [message #90031 is a reply to message #89587] |
Wed, 17 December 2003 16:22  |
Eclipse User |
|
|
|
Michael Bildner wrote:
> The project was a Managed Make project. Below is the output from the
> C-Build view:
When you add directories in the project settings for include paths and
library paths, which contain backslashs, try adding them within double
quotes like:
"C:\Directory\lib"
Or try the way using '/' instead of '\'
c:/Directory/lib
Maybe this is the problem on the Proj1.exe linking line. The make and
compiler tools have their origin in Unix environments, though they
usually treat '\' as a line continuation.
> make clean all
> rm -rf dummest.o execute.o fetch_into.o globals.o make_connections.o
> run_simulation.o Proj1.exe
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o dummest.o ../dummest.C
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o execute.o ../execute.C
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o fetch_into.o
> ../fetch_into.C
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o globals.o ../globals.C
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o make_connections.o
> ../make_connections.C
> g++ -IC:\ArchLib2-5a -O3 -gstabs -Wall -c -o run_simulation.o
> ../run_simulation.C
> g++: Proj1.exe: No such file or directory
> make: *** [Proj1.exe] Error 1
> g++ -LC:\LibArch\ -o Proj1.exe dummest.o execute.o fetch_into.o
> globals.o make_connections.o run_simulation.o -larch2-5a
> Build complete for project Proj1
>
> Some extra information about the project ...
> The folder C:\LibArch contains the libarch2-5a library that i'm using.
> The folder C:\ArchLib2-5a contains the source code for the library.
> The file dummest.C contains the main function, and all other files
> provided contain added functionality that will be used by dummest.C.
>
> If you need any additional information, let me know. Thanks for the help.
>
> Michael Bildner
>
>
>
>>"alain" <alain@nowhere.ca> wrote in message
>>Post the output of the view call C-Build, it contains the trace
>>of the compilation.
>>
>>Was it with managed make or Standard make ?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06481 seconds