I'm building a cross-platform library which links to some other 3rd party libraries at run time (i.e. on Windows, the other libs will be available as DLLs whereas on Linux / OS-X etc they'd be shared objects, which are similar). For the sake of argument, one of those libraries is called "jack".
Obviously, our app can't guarantee which version of the other libs will be on the user's system (or even that they'll be installed at all). So our code is littered with statements like this:-
Code:
if (!jack_port_type_get_buffer_size) {
warning << _("This version of JACK is old - you should upgrade to a newer version") << endmsg;
} else {
some_var = jack_port_type_get_buffer_size();
}
We link to the latest version of jack, where that symbol is declared like so:-
Code:
size_t jack_port_type_get_buffer_size();
One problem is that it doesn't even seem to be an exported symbol (although that wouldn't affect the other platform builds). But apart from that, our customer might have an old copy of jack installed or even no copy! We seem to be making the assumption that if our customer has an up-to-date version, jack_port_type_get_buffer_size will be set to a valid address - but in all other case it'll be magically set to zero (there's nothing in our code that sets it to zero).
The project builds on Win32 platform, but not on x64.
Full error message: dllentry.obj : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
The dllentry.cpp (a DirectShow base class) compiles on both platforms. It contains the external declarations:
extern CFactoryTemplate g_Templates[]; extern int g_cTemplates; g_Templates[] is then used in two functions: __control_entrypoint(DllExport) STDAPI DllGetClassObject(__in REFCLSID rClsID, __in REFIID riid, __deref_out void **pv)
[Code]...
myClass.cpp contains the definitions for the two externals in dllentry.cpp, at top level, just after the includes:
CFactoryTemplate* g_Templates=0; int g_cTemplates=0;
myClass.cpp also compiles by itself, but the project does not build. I checked all the libraries in the project settings and all seems to be OK, the 64 bit versions are used.
What should I do to make the project build for x64 platform?
I built a C++ static library using WatCom IDE. It compiles without error, but running WLIB on it produces the msg:
Warning! Library contains no external symbols My WatCom compiler host is windows, & target is DOS.
If I convert the Library to an .exe program, by adding a main(), it executes fine, So there seems to be something I'm missing in the IDE settings for building a .lib.
I am debugging a library. I can step into the code however the watch window doesn't show the values of any variables. It will display a message in the value field:
Code: m_pParentCXX0017: Error: symbol "m_pParent" not found
Interestingly it does show values for local variables in that function but not member functions. Most of my data members are member function though that I want to debug. I am using VS2010.
#include <stdio.h> #include <tchar.h> #include <iostream> #include <string> #include <fstream>// enable writing to and reading from files #include <cstdlib> #include <time.h> using namespace std; class Person {
[Code] .....
Error list:
Code:
Error 1 error LNK2019: unresolved external symbol "void __cdecl saveperson(void)" (?saveperson@@YAXXZ) referenced in function _main H:Cry_DevProgrammingC++Using_class_ in_ c++Using_class_ in_ c++Using_class_ in_ c++.obj Error 2 error LNK2019: unresolved external symbol "void __cdecl displayperson(void)" (?displayperson@@YAXXZ) referenced in function _main H:Cry_DevProgrammingC++Using_class_ in_ c++Using_class_ in_ c++Using_class_ in_ c++.obj Error 3 error LNK2019: unresolved external symbol "void __cdecl editperson(void)" (?editperson@@YAXXZ) referenced in function _main H:Cry_DevProgrammingC++Using_class_ in_ c++Using_class_ in_ c++Using_class_ in_ c++.obj Error 4 error LNK1120: 3 unresolved externals H:Cry_DevProgrammingC++Using_class_ in_ c++DebugUsing_class_ in_ c++.exe 1
Code: #include <stdio.h> #include <stdlib.h> #define MAX_READ 2 int main( ) { char * secret = "abecedarium consisting This is a string literal!";
[Code] ....
I am trying to test what happens in the sscanf converted types (command and string) if they are smaller, i got surprised that the printf worked, so i dont know why.
this code is just a test for what i want to do, what i really want to do is for example: i have this string from the stdin which must have the following format:
connect name.surname
So I need to check the cases when it is not the input that i want, namely if the name.surname is for example bigger than 30 chars. and also if it has the abecedary characters from the ascii...
I have a program where I want to export the .lib file in a "Lib" folder, and the .dll file in the "bin" folder. How can I choose where the lib file and .dll file go?
My problem is my edit distance values are stored in a 2d array of ints and exported to a .csv and the ones at the end are rather LARGE.
The the edit distance max should be around 2000 but i am getting values of 1-100million, the weird thing is that I have checked back through my function and tested various parts of it and still dont understand where it is going wrong i thought it could be my memcpy and memmove parts but i have had no luck.
I wonder how can I improve my validity check for user input? I only want them to key in certain range of digit.
Also for my validity check, when I key in character such as ABC, it lead to infinity loop
Here is my code : Code: /*Write a program that can calculate user's age by getting user input their birth date.*/
#include "stdafx.h" #include <iostream> #include <time.h> using namespace std; int main() { int yyyy, mm, dd; //year, month, day int i = 0; //for the sake of validity check
Goal: To allocate some memory as a char*, read in some binary data, re-interpret it as a float* and then free the memory.
My code looks like:
void someFunction(float* &result) { char * tmp = new char[1000]; //...Fill the char buffer here... result = (float*)tmp; //Reinterpret binary data as floats
[Code] ....
Is the cast back to char* necessary on the red line (or could I have validly left it as float*)? Would it be different if I had written char * tmp = (char*)malloc(sizeof(char)*1000); on the blue line (and correspondingly used free (char*)floatData on the red line?
char girl; char computer; cout << "Girl choose one of symbol x or o"; so girl choose x.
problem : i need random symbol genetation. so if random symbol are x, than girl start play. if random symbol ar o, than computer start game. who to do this?
I want to get the occurence of the symbol ';' for each line of this C program. I type the name of the file Source.c and try to count the occuring symbol, but i am getting the value for ALL of the ';' for each line.
Code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h>/* For exit() function */ int main() { char file_name[150]; FILE *file2 = 0; gets(file_name);
here is the code i have so far, basically you have ti enter a price in pounds and it will convert it to euros. i have got the conversion working i am just unsure how to get the euro symbol for the out put.
#include <iostream> #include <iomanip> #include <cassert> using namespace std; int main() { char answer; float sumInEuros; int numberOfPrices;
I'm doing a homework assignment where I have to calculate monthly interest from a starting balance. I've pulled several sections of the code from various parts of the book. So my problem may be that I'm not combining them correctly.
I'm getting the following error: Error1error LNK2019: unresolved external symbol "public: __thiscall SavingsAccount::SavingsAccount(void)" (??0SavingsAccount@@QAE@XZ) referenced in function _main
The ios flags are new to me and that may be part of the problem. As soon as I can get a working program, I'm going to make the starting balance and interest rate user inputs. But I get seem to get past this error.
I am trying to find the best way to detect a small symbol such as :
Just for testing features I tried to load these into SURF example that comes with EMGU and it does not pick it up... And I think the technology used for SURF is better for objects with more details and color gradients...
#include <iostream> #include "namespaces.h" namespace mycode { void foo() { std::cout << "foo() called in the mycode namespace" << std::endl; } }
When I try to run this code i keep getting these errors;
Error1error LNK2019: unresolved external symbol "void __cdecl mycode::foo(void)" (?foo@mycode@@YAXXZ) referenced in function _mainC:UsersHomeDesktopgameDevWin32Project1Win32Project1Source1.objWin32Project1
I have such task. There is such alpahbet as {a, b} in markow algorithm concept. So I need to find out which letters (a or b) are more in word "p". If a then to retrieve the word with letter a, if-b-then word with letter "b", if there is equal quantity then 0. How to do it. Where to find such example, at least some clues how to begin.
My code is rather short, but when I compile it, I get 1 error about an unresolved external symbol, it probably has something to do with the file processing. . .
Just a basic keylogger using SDL
Keylogger.h #ifndef KEYLOGGER_H #define KEYLOGGER_H #include <fstream> #include <SDL.h> using namespace std; class Keylogger{
[Code] .....
Errors
Error1error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >::operator*(void)const " (??D?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@QBEABDXZ)C:Usersaviedocumentsvisual studio 2013ProjectsPracticePracticeKeylogger.objPractice