Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: darius on April 23, 2017, 11:52:31 pm

Title: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: darius on April 23, 2017, 11:52:31 pm
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
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: stahta01 on April 24, 2017, 03:31:51 am
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 (http://forums.codeblocks.org/index.php/topic,9996.0.html)

Tim S.

Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: BlueHazzard on April 24, 2017, 01:02:02 pm
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
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: darius on April 26, 2017, 02:11:07 am
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.
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: sodev on April 26, 2017, 02:37:47 am
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.
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: stahta01 on April 26, 2017, 02:50:26 am
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.
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: darius on April 26, 2017, 02:55:38 am
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
Title: Re: How to compile code from GitHub with C C++ compilers coming with CodeBlocks
Post by: Jenna on April 26, 2017, 05:45:59 am
Absolutely unrelated to Code::Blocks and therefore violating our forum rules.

Topic locked !