472,784 Members | 889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 software developers and data experts.

Gcc vs. Visual C++ compiler for Matlab

Hi,

I have compiled my cpp code in my matlab sucessfully using "mex" command. The compiler I used in "mex" is Visual C++ 8.0 compiler.
However, when I try to use gcc compiler instead for compile this file for matlab use in Linux environment, the compilation is not successful.
The error message I got is the following. Any hints or explanation would be appreciated. Thank you in advance.

gary


>> mex ldpc_encoder_prepros_c.cpp
ldpc_encoder_prepros_c.o: In function `CLDPCEncoderPreProc::UrbankeCH(int)':
ldpc_encoder_prepros_c.cpp:(.text+0x37d): undefined reference to `CLDPCEncoderPreProc::ColUnkown'
ldpc_encoder_prepros_c.o: In function `CLDPCEncoderPreProc::CLDPCEncoderPreProc(unsigned int, unsigned int, unsigned int, unsigned int, double const*, int const*, int const*, double const*)':
ldpc_encoder_prepros_c.cpp:(.text+0xb14): undefined reference to `CLDPCEncoderPreProc::ColUnkown'
ldpc_encoder_prepros_c.o: In function `CLDPCEncoderPreProc::UrbankeAH(int)':
ldpc_encoder_prepros_c.cpp:(.text+0xf93): undefined reference to `CLDPCEncoderPreProc::ColUnkown'
ldpc_encoder_prepros_c.o: In function `CLDPCEncoderPreProc::UrbankeCHT(int)':
ldpc_encoder_prepros_c.cpp:(.text+0x162e): undefined reference to `CLDPCEncoderPreProc::ColUnkown'
ldpc_encoder_prepros_c.o: In function `CLDPCEncoderPreProc::CLDPCEncoderPreProc(unsigned int, unsigned int, unsigned int, unsigned int, double const*, int const*, int const*, double const*)':
ldpc_encoder_prepros_c.cpp:(.text+0x2404): undefined reference to `CLDPCEncoderPreProc::ColUnkown'
collect2: ld returned 1 exit status
Jan 6 '08 #1
1 4590
weaknessforcats
9,208 Expert Mod 8TB
Undefined references occur in two places.

First, during the compile when you use something that has not been declared. If this is your situation , check that all header files have been included.

Second, things compile OK but die in the link due to unresolved references. Here you need to be sure that all sources files were part of the build and that all libraries were correctly added to the build.
Jan 6 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dataangel | last post by:
I'm a student who's considering doing a project for a Machine Learning class on pathing (bots learning to run through a maze). The language primarily used by the class has been Matlab. I would...
3
by: Mohammed Smadi | last post by:
Hi; Does anyone know if we can call matlab for a python or bash script while feeding the matlab script some command line arguments? I have an interactive matlab script which i want to automate...
9
by: Carl | last post by:
I am desperately looking for a way to call Python from Matlab. I have become used to Python's rich syntax and large number of libraries, and feel ridiculously clumsy being stuck with Matlab's...
2
by: lord.tyranus.96 | last post by:
Hi wizards, does somebody know how to read a matlab file with visual basic .net . Thanks in advance.
67
by: Nimmi Srivastav | last post by:
Apologies if my cross posting has offended anyone.... For a pure hobbyist C/C++ programmer, who wants to develop applications to run on Windows, what would be a better choice to install: Visual...
4
by: itcecsa | last post by:
Hi, I am implementing a small Python project, what I am going to do is to open Matlab and run some M-files, and get some output from Matlab command prompt. I have no idea how to open Matlab...
1
by: sanctus | last post by:
I have a Matlab code which works fine in windows. Now I installed Xubuntu (because this way I have admin rights(=root) which I don't have on windows) and want to use the same code. To be able to...
1
by: ataeft | last post by:
does any body know how to connect MATLAB 2008 with VISUAL C++ 2008? The files which are produced by MATLAB compiler 4.8 are not working in VISUAL C++ 2008!! During building the project in visual...
14
by: Luna Moon | last post by:
Dear all, Can C++/STL/Boost do the vectorized calculation as those in Matlab? For example, in the following code, what I really want to do is to send in a vector of u's. All other...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.