Call native function from file without /clr [closed] - c++

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a C++ Windows Forms Project in Visual Studio but I need some functions that cannot be compiled using the Common Language Runtime Support /clr
So I added a new cpp file with native code and set to compile it without /clr.
Assume that I have a function called getNativeData() which returns a std::string, how can I call this function from my Windows Forms header file?

It's apparently some kind of bug in Visual Studio, i excluded the files from the project and added them again. This solved it.

Related

cant run any c/c++ program [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Anytime I try to run a simple C or C++ program in CLion or emacs, no output shows up.
EDIT: Using virtual environment, C was not installed properly.
CLion doesn't ship with a C/C++ compiler. You need to install your own compiler, and then set it up with CLion.
For windows, you can install:
MinGW
Cygwin (make sure you select gcc-core and g++ during setup)
CLion will detect these environments automatically during installation if you set them up in their default locations.

Is it possible to make an application in Visual Studio 2013 (C++) NOT requiring the VC Redistributable? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
As basic as this may sound, it seems it's actually NOT possible!
Talking about a totally "empty" application, only containing the WinMain() function and including <windows.h>. And of course, the "Use of MFC" options in the project is set to "Use Standard Windows Libraries".
Yet the application requires MSVCR120.DLL to run, as if it really uses MFC.
Looked into this similar thread, but didn't help.
Any idea?
The option can be found in the Project Properties under C/C++ -> Code Generation -> Runtime Library - set it to Multi-threaded or Multi-threaded Debug to not depend on the redistributable.

Importing .dpr project with C++ Builder 6 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am a beginner in Delphi.
I want to know if I can import a (dpr) file extension in c++ builder 6?
What all changes I need to do for that?
I tried to do that and got the error
there was a problem sending the command to the program
If i want to run my application to all version of windows how can i do that(windows XP,Windows 7 and Windows 10).
Thanks
According to Remy's answer here what you are trying to do is simply not possible.
When I try to open a Delphi Project with the file extension *.dproj or
*.dpr I get the message, " The Project can not be loaded because the
required personality Delphi.Personality is not available ".
The C++Builder personality cannot load Delphi projects. You can,
however, add Delphi source files to a C++ project.
Is there a way to open and look at a Delphi project in C++Builder without
installing the full Delphi IDE?
Not an entire project, no.

C++ program not running on other computers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
A simple question, I have made a program that runs on my computer perfectly but not on someone else's computer. This simple question is a big headache of mine. I have read at least thousands of topics on the internet.
I tried to copy msvcp90.dll and other dll files to the target machine but that didn't work. I read an article which says you have to copy a manifest file too. Now I don't know which manifest file to copy.
I also have created my own dll file but that didn't work either.
Can anybody please help me, I'm in a big headache (I don't want to statically link the libraries, just tell me the concept of dynamic linking). Thank you.
One other thing, I have used windows.h header file in my program and a lot more header files. I am using visual studio 2008.
First, make sure you are compiling the release version of your application - typical users never have the debug c-runtime installed.
Second, you probably want to install the full c-runtime library on the client machine that corresponds to the version of Visual Studio you are using. Here's a link for the VS 2008 runtime: C Runtime Library

Is there a libPNG 64-Bit? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I have a problem with libPNG, which is leading me to believe that I need a 64bit version of libPNG to run my application on a 64bit computer. The error is IMG_Load: Failed loading libpng15-15.dll: %1 is not a valid Win32 application. According to some other posts on this site, it is the fact that this is a 32bit DLL, is that the problem?
Yes, libpng works on 64-bit architectures, including x86_64.
It's an open-source library so you can compile it with your project if a precompiled binary isn't available for your platform/architecture.