Solved

Getting alloca to work in DLL

Posted on 2003-11-07
1
402 Views
Last Modified: 2008-02-01
Hi,

I am using Visual C++ 6 to try to compile a C++ package called OpenNURBs into a DLL which can be opened by Matlab.

I am using the Matlab Add-on for Visual Studio, which lets you select "Matlab Project" as a new project. When compiling I get the error message:

"Error C2065: 'alloca' : undeclared identifier"

I figure I'm missing the C Run Time libraries. I've added msvcrt.lib to the Link settings for the project, but still no dice.

Any ideas?
0
Comment
Question by:cdunn03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 250 total points
ID: 9700933
There is no "alloca()" function in the VC++ runtime.  It's no wonder that the compiler is complaining about it.  Try alloc() instead.  

If you mean to use _alloca() then use that, but not alloca().
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question