Retvisan Posted September 14, 2019 Report Share Posted September 14, 2019 Hello everybody, My question is about how to configure GCC compiler in CodeLite. I have already compiled my downloaded SystemC library, but I could not correctly configure my CodeLite IDE. I am using GCC compiler. My path with SystemC is located here: /home/leo/Desktop/systemc-2.3.3 I have decided that I should include library paths inside a CodeLite using global paths. Without changing Linker and Compiler options. On the last screenshot you can see the log. Please tell my what should I do to configure my IDE Thanks in advance, Fedor Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 15, 2019 Report Share Posted September 15, 2019 According to log, you are using C compiler driver (/usr/bin/gcc). SystemC is C++, you should write your application in C++ and use C++ compiler driver (g++). Maybe your IDE automatically uses C compiler because you named your source file main.c Retvisan 1 Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 17, 2019 Author Report Share Posted September 17, 2019 On 9/15/2019 at 5:16 PM, Roman Popov said: According to log, you are using C compiler driver (/usr/bin/gcc). SystemC is C++, you should write your application in C++ and use C++ compiler driver (g++). Maybe your IDE automatically uses C compiler because you named your source file main.c Hello Roman, I have changed settings of my IDE to g++ compiler driver and my previous error was solved, but I have got 23 new ones) Could you help me to understand why it has happened Thanks in advance, Fedor Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 17, 2019 Report Share Posted September 17, 2019 You forgot to link SystemC library. Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 19, 2019 Author Report Share Posted September 19, 2019 On 9/18/2019 at 12:16 AM, Roman Popov said: You forgot to link SystemC library. Hello again, I have set libraries path as well. But it does not work,what mistake I have? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 19, 2019 Report Share Posted September 19, 2019 Setting library path != Linking library. Also add -l systemc to g++ options. Retvisan 1 Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 23, 2019 Author Report Share Posted September 23, 2019 On 9/19/2019 at 4:54 PM, Roman Popov said: Setting library path != Linking library. Also add -l systemc to g++ options. Hello Roman, Now it is working corectly and I can build the project but when I execute the programm I see the following message. Why I see this one, if programm is already compiled. Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 23, 2019 Report Share Posted September 23, 2019 Because dynamic linker does not know where to find library. You have two options: use -Wl,rpath,<path/to/lib> command line option at compile time, or set LD_LIBRARY_PATH environment variable. Google for more details. Retvisan 1 Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 23, 2019 Author Report Share Posted September 23, 2019 22 minutes ago, Roman Popov said: Because dynamic linker does not know where to find library. You have two options: use -Wl,rpath,<path/to/lib> command line option at compile time, or set LD_LIBRARY_PATH environment variable. Google for more details. Could you please tell me what the difference between dynamic linker and simple linker is? Because I have already set Linker options. Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 23, 2019 Author Report Share Posted September 23, 2019 22 minutes ago, Roman Popov said: Because dynamic linker does not know where to find library. You have two options: use -Wl,rpath,<path/to/lib> command line option at compile time, or set LD_LIBRARY_PATH environment variable. Google for more details. Could you please tell me what the difference between dynamic linker and simple linker is? Because I have already set Linker options. Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 23, 2019 Report Share Posted September 23, 2019 Shared libraries and dynamic linker are explained many times on a web, let me google it for you. Quote Link to comment Share on other sites More sharing options...
Retvisan Posted September 23, 2019 Author Report Share Posted September 23, 2019 1 hour ago, Roman Popov said: Shared libraries and dynamic linker are explained many times on a web, let me google it for you. I have understood. Simply I have not knew that there are Linker and dynamic Linker. That is the reason why I have repeated my question. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.