Author Topic: How to compile code from GitHub with C C++ compilers coming with CodeBlocks  (Read 3899 times)

Offline darius

  • Single posting newcomer
  • *
  • Posts: 3
Hi,

could you tell me,
how to compile code from GitHub with C C++ compilers coming with CodeBlocks ?

web link to the code is:

https://github.com/Self-Driving-Vehicle/CANBUS-Hack

http://illmatics.com/content.zip

Code looks to be a mix of C and C++
there is more than one main.c file , renamed.

How to open unzipped project's code within CodeBlocks as file directory ?

Let me know if C and C++ compilers coming with CodeBlocks are fit to compile the above code from GitHub,
if not, should I use MS Visual Studio and MS C C++ compilers ?

Codeblocks installed easily under Windows XP
If source code is not renamed to main.c
default main.c code gets compiled - Hello World every time.

thank you

Jack

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
I am undecided whether this post is inside or outside the rules.

Link to the rules http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2433
this are quite mixed applications with python, from your posting i think this is quite over your head, and i don't think anyone has the time, to give you a step by step instruction.
The documentation of all this is really poor, or non existent. This does not help either...

The easiest way is to create a project and add the files:
Simply create a console project , delete the main.cpp and add the c and h files with Project->Add files

Quote
Let me know if C and C++ compilers coming with CodeBlocks are fit to compile the above code from GitHub,
if not, should I use MS Visual Studio and MS C C++ compilers ?
No idea... you have to look trought the code and look if there are some msw specific compiler options. You can try the import plugin of Codeblocks: File->Import project->MS Visual studio project file

Quote
If source code is not renamed to main.c
default main.c code gets compiled - Hello World every time.
well in main.c is the main function... You have to add the source files to the project to let codeblocks know what you want to compile

Offline darius

  • Single posting newcomer
  • *
  • Posts: 3
this are quite mixed applications with python, from your posting i think this is quite over your head, and i don't think anyone has the time, to give you a step by step instruction.
The documentation of all this is really poor, or non existent. This does not help either...

Thank you  BlueHazzard for your kind and excellent reply.

You are exactly right about the missing documentation but GitHub projects don't come with manual by default, so I have contacted genuine project developers to get helpful hand
and all I have if code from GitHub.


The easiest way is to create a project and add the files:
Simply create a console project , delete the main.cpp and add the c and h files with Project->Add files

Ok. I know now how to add files to the project.

Quote
Let me know if C and C++ compilers coming with CodeBlocks are fit to compile the above code from GitHub,
if not, should I use MS Visual Studio and MS C C++ compilers ?
No idea... you have to look trought the code and look if there are some msw specific compiler options. You can try the import plugin of Codeblocks: File->Import project->MS Visual studio project file

I tried MS win32 to build console app.

Quote
If source code is not renamed to main.c
default main.c code gets compiled - Hello World every time.
well in main.c is the main function... You have to add the source files to the project to let codeblocks know what you want to compile

Ok.
I mean ECOMcat.c should be renamed to main.c first
since otherwise all build and compilation is done for a default main.c Hello World file coming with codeblocks

Since
ecomcat\content\code\ecomcat_api\Debug
directory comes with precompiled binaries

what is missing is ecommlib.dll to be built

ecommlib.lib is coming with
ecomcat\content\code\ecomcat_api\ecomcat_api
directory

More about ecommlib.dll comes from
https://www.cancapture.com/sites/default/files/downloads/ECOM_Developers_Library_Reference.pdf


Ok, I am fully aware I need to offer bounty.
All I need is to build simple application to perform AUTOPARK function for a CAN bus controllable car.
AUTOPARK should work with park cameras and ultrasonic parking sensors.

So I need budget to succeed.

Thank you once again.
codeblocks is really great toolbox to build C, C++ projects if you live on Windows XP.

You are free to join my AUTOPARK project.

Offline sodev

  • Regular
  • ***
  • Posts: 312
I mean ECOMcat.c should be renamed to main.c first
since otherwise all build and compilation is done for a default main.c Hello World file coming with codeblocks

After reading this i am dead sure whatever "project" you have in your mind, drop that idea. You have no idea about coding at all, i doubt it looks much different in the area of can networking.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
I mean ECOMcat.c should be renamed to main.c first
since otherwise all build and compilation is done for a default main.c Hello World file coming with codeblocks

After reading this i am dead sure whatever "project" you have in your mind, drop that idea. You have no idea about coding at all, i doubt it looks much different in the area of can networking.

Does the CB site support black or white hat code crackers; or in other words script kiddies?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline darius

  • Single posting newcomer
  • *
  • Posts: 3
I exactly described what I get with codeblocks
when I try to compile ECOMcat.c

all I get is Hello World, default main.c input.
Try it yourself.

Ok, I need to get now ecommlib.dll from genuine developer.

thank you

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Absolutely unrelated to Code::Blocks and therefore violating our forum rules.

Topic locked !