I have a routine in C++ Builder 6 that send a file to webserver via HTTP Post, and when compile the project show these error messages from Linker:
[Linker Error] Unresolved external"__fastcall Idmultipartformdata::TIdMultipartFormDataStream()" referenced from C:\Users\Admin\Documents\ProjCB6\Unit1.obj.
Then; How I can do for resolved this problem? Thanks in advance!
Here leave used source code =>
void HTTP()
{
TStringStream *response=new TStringStream("");
TIdMultiPartFormDataStream *stream=new TIdMultiPartFormDataStream();
TIdHTTP *IdHTTP1 = new TIdHTTP(NULL);
try
{
IdHTTP1->Request->ContentType=stream->RequestContentType;
stream->AddFormField("file1","doc");
stream->AddFile("file1","c:\\3.doc","doc");
stream->Position = 0;
IdHTTP1->Post("http://172.16.8.186/doc/up.php",stream,response);
Memo1->Lines->LoadFromStream(response);
response->Free();
stream->Free();
IdHTTP1->Free();
}
catch(...)
{
response->Free();
stream->Free();
IdHTTP1->Free();
}
}
C++Builder 6 shipped with Indy 8. TIdMultipartFormDataStream was introduced in Indy 9. The fact that your code compiles at all means that your project is using Indy 9 or Indy 10 header files, but the project might have a reference to the older Indy 8 package instead of the nwer Indy 9/10 package(es). Make sure that you have completely wiped out Indy 8 from your BCB6 installation if you have upgraded to Indy 9 or later, and also make sure that your project contains references to the correct Indy package(s) for that version of Indy.
Related
Using C++ Builder 10.3 Update 2
I'm upgrading some existing software from classic Borland compiler to Clang 64.
The entire project consists of a number of static libraries, and some applications.
When building the final applications, I'm running into linker issues that look like this:
[ilink64 Error] Error: Unresolved external 'std::_Facet_base::_Facet_base()' referenced from XXX.A|xxx.o
[ilink64 Error] Error: Unresolved external 'vtable for std::locale::facet' referenced from XXX.A|xxx.o
[ilink64 Error] Error: Unresolved external 'vtable for std::ctype_base' referenced from XXX|xxx.o
The libraries are using std::stringstream, and std::readline, along with some other std library functions.
The general pattern that is causing the error is:
// mystaticlib.h
void foo();
// mystaticlib.cpp
#include <sstream>
void foo() {
stringstream ss;
// do some more stuff
}
// myapp.cpp
#include "mystaticlib.h"
void bar()
{
foo();
}
Is this a bug with the compiler/linker?
I've found these related questions (and more):
Undefined reference to vtable
Linking error: undefined reference to `vtable for XXX`
Linker error: undefined reference to vtable
But the answers generally boil down to "implement the missing functions".
Since this is the std library delivered with the product, I'm hesitant to start changing it.
I'm fairly familiar with C++ Builder, and C++ and I've tried investigating all the basic stuff.
This code did compile, link and run using C++ Builder 10.3 with the classic 32 bit compiler.
This is so low level that I'm having a hard time figuring out what is wrong.
Because of reasons, I would prefer not to update to 10.4 at this time.
I also saw that there is a 10.3.3 release, but I was hoping not to upgrade unless I specifically had to to fix this problem.
In a Data Module I put a SQLDataSet and will be for the SQLConnection. In the "CommandText" property I'm using the line:
select * from tblusers
When changing the "Active" property of SQLDataSet, it returns the error "Attempt to reopen an open cursor" or "unknown ISC error 0". The latter occurs once, on the first attempt. I'm using Delphi Rio 10.3 and Firebird 3.0 Dialect 3.
I went back to Firebird 2.5 and I didn't get the error with SQLDataSet anymore, the connections went back to normal. I believe there is some incompatibility with the new Firebird 3 Library.
We are migrating code to the Clang-based 64-bit compiler in C++Builder 10.2.3.
The linker is complaining about an unresolved external for pow10(), which is in math.h, but apparently we need a lib that isn't being linked.
Does anyone know which one it is?
AFAICT, it is not linked in. I dumped cw64.a and it does not contain that function.
There is an alternative:
double d = pow10l(2);
That will compile and link fine, and give the correct result, 100.0. The result is supposed to be a long double, but that maps to double in Win64, so that works fine.
FWIW, there is also a function _pow10(), but that is for internal use only. It seems to be a helper function for pow10l() and some other functions.
I am trying to stream a live video(rtsp) using ffmpeg library
in avutil.h
How to resolve this issue.
It's happened in Xcode9 ,so you can change AVMediaType to FF_AVMediaType in list files: avcodec.h avfilter.h avformat.h avutil.h
I am using zxing and OpenCV lib in my project. I updated my XCode from 4.5 to 4.6 today and I am getting this error.
externalLibs/boost/include/boost/gil/channel_algorithm.hpp:54:85: Non-type template argument evaluates to -1, which cannot be narrowed to type 'unsigned long long'
And this error is on this line of code in one of the class of OpenCV Library:-
struct unsigned_integral_max_value : public mpl::
integral_c< UnsignedIntegralChannel,-1> {};
On Earlier version of Xcode its working fine.
Thanks in advance.
It seems boost doesn't like c++ 11 support added with the new clang compiler
so.. it say disable c++ 11 support in build settings
= src: see https://svn.boost.org/trac/boost/ticket/7270
The max value of an unsigned long long variable is in hex 0xFFFFFFFF FFFFFFFF, i.e. all bits are 1's. If interpreted as a signed number, this corresponds to a -1. So often programmers use -1 instead, hoping that the compiler will not complain. Apparently, this did not happen in XCode 4.5, but 4.6 does more rigorous checking...
I'm running into the same error when compiling on macOS Sierra with Apple LLVM version 8.1.0 (clang-802.0.42) and -std=c++11. To solve the problem I included the following compiler flag: -Wno-error=c++11-narrowing