Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

building C and C++ in one project (Visual C++ 6.0)

Status
Not open for further replies.

jossion

Member level 3
Member level 3
Joined
Oct 19, 2005
Messages
60
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
India
Activity points
1,658
Hi

I have one CPP file with serial port data transfer win32 API's and another set of C files having basic calculations(Image processing). I would like to compile these files in one project and build an exe. But its not possible. I tried many ways.

simply called the CPP file as a function and tried to compile. That was not working.
Then renamed all C files to CPP(since C files had only basic calculations) and then tried to compile. It was showing errors to some extern variables and so on.

What I would like to know is- is there any settings to be done to the compiler to compile mixed C and C++ files in one project??

Thanking you in advance.
 

I think the better manner is to reprogram under vc++. Cause you'll spend only time to understand the problem and to correct the errors
 

is it possible to convert files from matlab to c++
 

you mean by convert: use some tool that convert the code automatically? I really don't know but I think taht if you're matlab code is running it's so easy to make a C++ code based on matlab one!
 

I think it is possible to conver matlab codes to C++ using Matlab Compiler. the command is mcc. you can try it.
 

regarding problem with C and C++ I can not realize why you could not compile them together. but you may find this helpful: convert file written in c++ to a dll file and load it in those c files and used it.
regarding MATLAB and C++, you can write a function in matlab and use COM to create a COM object and use it in c++. BUT I myself cannot use it. there is a help in Mathwork about using COM objects.
 

dear mhamed

About Usiung com Obj,

There was some errors with matlab 7. But they have solved most of them in Matlab 2006 b. I think you used the version with those bugs.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top