I have resolved the problem, thanks!
Best, Slava Rychkov
Slava Rychkov wrote:
> Hi!
>
> I am using a library (Pythia8108 - a package for high energy physics
> simulations).
> When I just include all library source files in my project, my project
> compiles.
>
> However, when 1) I compile the library separately , creating .a file
> 2) add this .a file to my project mentioning its directory in "Library
> directories" in project options
>
> I get a bunch of unresolved references.
>
> When I copy the library file to the Dev C++ lib directory and mention it
> also in the Linker options of the project, the number of unresolved
> references decreases, but some still remain. I post the linker log below.
>
> What could have possible go wrong?
> Thanks,
> Slava
>
>
>
> Compiler: Default compiler
> Building Makefile:
> "D:\----Fisica----\pythia8108\my_projects\MinvGeneration\Makefile.win"
> Executing make...
> make.exe -f
> "D:\----Fisica----\pythia8108\my_projects\MinvGeneration\Makefile.win" all
> g++.exe my-process.o ../cross-section-class.o -o "Project1.exe"
> -L"C:/Dev-Cpp/lib" -L"D:/----Fisica----/pythia8108/lib"
> ../../lib/libPythia8.a
>
> ../../lib/libPythia8.a(PartonDistributions.o)(.text$_ZN7Pythia815LHAPDFInterface10setPDFparmESs[Pythia8::LHAPDFInterface::setPDFparm(std::basic_string<char,
> std::char_traits<char>, std::allocator<char>
> >)]+0x2e):PartonDistributions.cc: undefined reference to `setlhaparm_'
>
> ../../lib/libPythia8.a(PartonDistributions.o)(.text$_ZN7Pythia815LHAPDFInterface8initPDFMEii[Pythia8::LHAPDFInterface::initPDFM(int,
> int)]+0x14):PartonDistributions.cc: undefined reference to `initpdfm_'
> ../../lib/libPythia8.a(PartonDistributions.o)(.text$_ZN7Pythia815LHAPDFInterface17initPDFsetByNameMEiSs[Pythia8::LHAPDFInterface::initPDFsetByNameM(int,
> std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >)]+0x35):PartonDistributions.cc: undefined reference to
> `initpdfsetbynamem_'
> ../../lib/libPythia8.a(PartonDistributions.o)(.text$_ZN7Pythia815LHAPDFInterface11initPDFsetMEiSs[Pythia8::LHAPDFInterface::initPDFsetM(int,
> std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >)]+0x35):PartonDistributions.cc: undefined reference to `initpdfsetm_'
> ../../lib/libPythia8.a(PartonDistributions.o)(.text$_ZN7Pythia815LHAPDFInterface10evolvePDFMEiddPd[Pythia8::LHAPDFInterface::evolvePDFM(int,
> double, double, double*)]+0x22):PartonDistributions.cc: undefined
> reference to `evolvepdfm_'
> collect2: ld returned 1 exit status
>
> make.exe: *** [Project1.exe] Error 1
>
> Execution terminated
>
--
Vyacheslav Rychkov https://mail.sns.it/~rychkov
Scuola Normale Superiore Tel: +39-050-509068 (office)
Classe di Scienze +39-050-3820086 (home)
Piazza dei Cavalieri, 7 +39-3403925168 (mobile)
56100 Pisa Fax: +39-050-509045
Italy E-mail: Ry...@sn...
|