C++ :: MinGW And Export Link Libs?

Jan 5, 2012

I'm building an app using VC++. The app links to a DLL built using TDM-GCC (which uses MinGW I think). Obviously, the DLL comes with a link lib.

If the lib is linked to another MinGW app, the DLL functions get found by name. So if the DLL builder updates his DLL, the MinGW app carries on working.

However, if the same lib is linked to a VC++ app, the functions get found by ordinal value. But MinGW doesn't seem to have any means of guaranteeing that a later build of the DLL will use the same numbering scheme. So his new DLL will break the pre-existing VC++ app that used it.

In VC++ this problem could be solved by using a DEF file but that doesn't seem to work in MinGW. So my question is:- can a DLL built with MinGW be somehow instructed to export its functions only by name - or at least to export them so that any other compiler will import them by name and not by ordinal numbers?

View 8 Replies


ADVERTISEMENT

C++ :: Codeblocks Not Finding Libs - Permission Denied

Oct 18, 2013

I upgraded to code::blocks and now I have the errors while trying to install sfml and sdl (to use in a dual project): Codeblocks libs:Permission Denied

Codeblocks libs is a custom folder I created and copied libs from the lib folders to because I got the same errors in the actual folders and thought it might be because of their location. What should I do?

View 19 Replies View Related

C/C++ :: Madd Libs Game - How To Store Inputted Strings Or Values To Arrays

Nov 11, 2014

My assignment is writing Madd Libs game. I still do not understand how to store inputted strings or values to arrays. I need explanation of collecting inputted data to arrays.

#include "stdafx.h"
#include<stdio.h>
//#include<string.h>
int main(void) {
char string[37] = {''};
char adjective1[15];

[Code] ....

View 14 Replies View Related

C++ :: How To Set Stack Size With GCC MinGW

Jun 3, 2014

I'm following a course with coursera (algorithm 1) and my program for the assignment crashes inexorably (many are experimenting the same thing there, the assignment asks for a recursive program for solving a big graph of 500000 nodes). I'm using a version of g++ from MinGW with the editor Geany and windows7. The current setup is:

g++ -std=c++11 -Wall -c "%f"
g++ -std=c++11 -Wall -o "%e" "%f"

How can I set the stack 'unlimited'?

View 5 Replies View Related

C++ :: Making Static Library With MinGW

Jul 5, 2012

There is a file compressor called FreeArc (that has GPL code) and a sub project called Unarc (meant for file extraction only) that is free for any use.

Their source codes can be downloaded from here: [URL] ....

Unarc has a makefile for making a dll. I am trying to make it static instead (.a file), using MinGW, but am failing.

If I use the .o files compiled by the makefile to make one .a file, the decompression methods don't seem to be recognized as they should, so I can't extract anything. These decompression methods are added through static functions called withing the .cpp files of each method, so I guess their code is not being executed.

View 14 Replies View Related

C++ :: Game Engine - Linking Error On MinGW

Aug 6, 2013

I want to write a game engine with MinGW and Code::blocks ide

[URL] ....

This is my project's source code

[URL] .....

This is the build log.

I can't code it here, because it's two large to add the characters!

View 10 Replies View Related

C++ :: Undefined Reference With Mingw (template Usage)

Apr 10, 2014

I am wondering why ToStr throws me this error. I am using mingw64 and codeblocks.

Code:

E:JackyDocumentsCode Blocks ProjectsPerfectSimXmain.cpp|35|undefined reference to `std::string ToStr<int>(int const&)'|

Code:
for (int i = 0; i < NO_CAMS; i++) {
std::string filename("E:/Jacky/Documents/Code Blocks Projects/PerfectSimX/Data/Cam");
std::string restFileName(".cam");
filename += ToStr(i);

[Code] ....

View 4 Replies View Related

C++ :: Accessing Symbols In Application From Within Dynamic Library MinGW

Apr 17, 2013

I am porting an application from Linux to Windows. Since it is a GTK app most of the stuff works; I have to touch a little here and there. One problem though I cannot find the solution as it seems. The application uses a plugin system for easy expandable functionality. The interface to the plugin is very simple: an init function, a worker function, and a deinit function. The plugins shall have access to the main applicationsymbols (functions global variables). I cannot find a working (and feasible) way under Windows to make the linking work. I always get "undefined reference" errors for symbols which exist in the application. I am using MinGW 4.6.2. I made a stripped down demo application to be able to better (and faster) test the principle. I am using the dlfcn-win32 project from Ramiro Polla [URL]... for the dynamic loading stuff and it works like a charm.

Here is the project:
plugintest.tar.gz
plugintest.zip

It tried a number of commandline options to the linker for the application (--export-all-symbols, --export-dynamic, -rdynamic (apparently not supported in MinGW)) as well as for the shared objects (--allow-shlib-undefined, --enable-auto-import, --enable-runtime-pseudo-reloc).

As you can see in the provided makefile under Linux it is just "-shared" for the .so. Under Mac OS X (Darwin) it is "-bundle -bundle_loader <app name>".

Either it is a different configuration / environment or I must have overlooked something. How to do this and if it is even possible in Windows?

Here is a .zip archive of the dlfcn stuff with modified makefile, which works on the cmd.exe command prompt; MSYS is not required. Just adjust the MinGW installation path in config.mak and type 'make" and 'make install'. dlfcn-win32-r19.zip

View 9 Replies View Related

C++ :: Installed Cygwin - Mingw Install Required In Order To Use DirectX?

Jan 20, 2014

Goal: I want to use cygwin g++ to write DirectX applications.

I know that one of the mingw packages contain directx libraries.

Now that I have installed cygwin, can I use directx also?

BTW, does netbeans open a mingw project using cygwin tool chain?

View 5 Replies View Related

C++ :: Export Classes In DLLs

Mar 6, 2015

Is there a way to export a c++ class for another language. I need to find an interpreted language that can use c++ classes (actually just one class) exported in DLLs. It wouldn't surprise me if you couldn't though because of how classes are handled in c++. Maybe python could do it because it's object oriented uses something very similar to the "this" pointer.

I have heard about something called COM.

View 7 Replies View Related

C/C++ :: How To Export Output To Excel

Dec 21, 2013

I've got a program in C that creates DATA. I need to export the DATA to excel, so I can re export to Access and use in the data base.

I also need to run the Builder in the C++ file every 5 minutes to generate the DATA based on time. How can I do that ?

View 2 Replies View Related

C++ :: How To Export Class With Template

Jun 3, 2014

I have the following class header in library, but when i initialize in main the class, i have an error unresolved external symbols. So the class is not exported as it should.

Code:

template <typename Key, typename Value>
class UTILITIES_EXPORT MyMap : public QMap<Key, Value>
{
public:
MyMap() : QMap<Key, Value>() { }

[Code]....

View 4 Replies View Related

C++ :: Output Of Dumpbin Export To See Functions Of A DLL

Apr 22, 2013

From the console of VCE I have run dumpbin export as

Code: dumpbin /export myDLL.dll

in order to see which functions is the dll providing. I got as an output:

Code: ordinal hint RVA name
1 0 00024B0 _Function1@4
2 1 00024E0 _Function2@0
.....
I think RVA means Relative Virtual Address, but what does the @4 or the @0 (or @16) means?

BTW the @# notation is a c-style function naming convention where the number is the size of the parameters accepted by the function. 4 might be an integer or a pointer on a 32-bit system.

If this is the case, I am guessing a @12 might mean three integers and @16 four integers?

View 1 Replies View Related

C# :: Take Data From GUI And Export Into Excel File

Jul 1, 2013

i'm kinda new to c#, i wanna create a program which will take few data from GUI and export it into an excel file. Another thing is how to modify the data displacement in that particular excel file?

View 6 Replies View Related

C# :: Export Windows Form To Excel?

May 3, 2015

I want to export the windows form in which text box,label and gridview ,gridview export to excel is working fine,but i need to export the whole form as such to excel.Is there any option to select Panel : This is my code:

private void btnExport_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Excel Documents (*.xls)|*.xls";

[Code].....

View 2 Replies View Related

C# :: Export Tabulated String To Excel File

Apr 9, 2014

I am able to export a tabulated string to an Excel file, when I open the file in Excel it looks fine (3 rows, 3 columns). However, the formatting seems a bit dodgy as I can't then read the same file back using C#. If I open it in Excel and do a save as, then I can read it from C#.

fileWriter = new System.IO.StreamWriter(@"C:Sheet1.xls"); //

This overwrites file each time by default.

fileWriter.Write("COL_A COL_B COL_C
1 2 3
10 20 30");
fileWriter.Close();

To read the Excel file back i'm using the following code:

OleDbConnection cnn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + (@"C:Sheet1.xls") + "; Extended Properties=Excel 12.0;");
OleDbCommand oconn = new OleDbCommand("select * from [Sheet1$]", cnn);
cnn.Open();
OleDbDataAdapter adp = new OleDbDataAdapter(oconn);
DataTable forceResultsTable = new DataTable();
adp.Fill(resultsDataTable);

The error I'm getting back is "OleDbException was unhandled" with "cnn.Open();" being highlighted in visual.

View 9 Replies View Related

C++ :: Shared Library Export And Calling Convention?

Aug 13, 2013

I want to create a simple shared library that exports a simple C API, just like llvm-clang.

The library should be compilable with any compiler and be used by a variety of languages, again just like clang.

For visual studio that is:

Code:
extern "C" __declspec(dllexport) void __cdecl myfunc(int arg);

The __cdecl is the issue here: i cannot seem to find a compiler agnostic way of specifying the use of cdecl.

So i went to see how my favorite C API libraries (ie clang) handle it.

none of them specify a calling convention at all!

Code:
#define CINDEX_LINKAGE __declspec(dllexport)
CINDEX_LINKAGE void clang_disposeIndex(CXIndex index); //exported

how does that work? How does the compiler know to use __cdecl and how would i link to it dynamically without that knowledge?

View 1 Replies View Related

C# :: CFD Program - How To Export Data Of Array Into XLS File In Different Sheets

Feb 11, 2014

I have written a CFD program that final results store at several 2D arrays. For instance, temperature of a square plate. For every point of plate i and j (i,j), I have a temperature amount. On the other hand, these temperatures change by time.

theSpace.TheCells[i, j,0].Temperature

I would like to save these data into an excel file and each sheet contains data for specific time (for example, an excel file with 50 sheets that cell number shows the coordinate of a point and the value in it is the temperature and next time step data's will be in the next sheet of current workbook )

I was thinking my code should be something like the following note, but it doesn't work:

// Implement time loop
int counter = 0;
for (int step= 1; step<= MaxSteps; step++) {
// call Excel output method
ExportData(ResultsArray,step,nx,ny);

[Code] ....

View 7 Replies View Related

C/C++ :: Loading TXT File To Convert Letters To Numbers And Export Again

Feb 5, 2015

I have been playing around with .txt and .dat files lately. I only manage to load the files, but I don't seem to be able to load files using a variable.

Also modifying the data after it is imported is also currently problematic. I know how to go about the process without the need to import anything, but whenever I import the data I am having trouble modifying/ editing the ".txt" or ".dat" data.

Below is my current code:

#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
ifstream file;
ofstream result;
char in_file_name[8], out_file_name[8];

[Code] ....

View 5 Replies View Related

C :: Cannot Get Programs To Link

Mar 23, 2013

I've copied and pasted my code. The main program, the calculateTaxes.cpp function code and my makefile. I am using the makefile to link these two codes together but I get an error when I type 'make' in the command line.

I receive the error code:
assign2c.cpp.text+0x169): undefined reference to 'calculateTaxes(float, float, float*, float*, float*)'
collect: ld returned 1 exit status
make: *** [main.exe] error 1

[Code]......

View 2 Replies View Related

C :: How To Link One File With The Other

Dec 10, 2014

I am new to programming for starters. The problem I am having is linking a sub .c file to my main.c I am assuming I will need to use #include <insert_sub_file.h> correct?

View 4 Replies View Related

C++ :: How To Link An Object To Another One

Jun 27, 2013

I have the following problem, I have an object of a class Subject, and I want that this object points to another object of class Classes, creating a kind of link. How can I do that?

View 4 Replies View Related

C++ :: Link The Strings To The Integers?

Nov 8, 2014

Code:
#include <iostream>
#include <string>
using namespace std;
int main()

[Code] ......

How do I link the strings to the integers?

View 4 Replies View Related

C++ :: How 3 Pointers Have A Link In Memory

Sep 2, 2014

declare

int *p[3];

that gives an array with 3 pointers, but how 3 pointers can have a link in the memory?

View 10 Replies View Related

C++ :: How To Link A Switch Statement To A If / Else

Aug 8, 2014

The sample output of this program would be:

Please select:
1 - Year
2 - Day
3 - Month
Input choice: 1
Input Number: 2
I'm a Sophomore!

Please select:
1 - Year
2 - Day
3 - Month
Input choice: 2
Input Number: 2
It's Tuesday.

Please select:
1 - Year
2 - Day
3 - Month
Input choice: 3
Input Number: 2
February. Heart's month!

Here is my code, I only typed the Year(levels) yet because when I tried to input 2(day) and 3(month) for the Input choice and after that, Inputting a number to 1-4 would yield the same result to case 1's year levels.

#include <stdio.h>
#include <conio.h>
using namespace std;

[Code].....

how to link the case 2 to days and case 3 to months?

View 1 Replies View Related

C++ :: How To Dynamically Link Library

Jan 3, 2014

I've recently integrated a scripting functionality into my game engine (squirrel), but I can't figure out how to dynamically link the library.I have to dynamically link some libraries for licencing sake, but I'm forced to statically link Squirrel. How can I statically link Squirrel, but dynamically link the others?

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved