problem about porting-Collection of common programming errors
unexplored
qt porting blackberry-playbook qwt qnx
I am new to Qt, cross compiling and porting so please bear with me.My goal is to use the Qwt library on Playbook OS for a Qt based application. I found a nice tutorial on Qt for Blackberry Playbook and I managed to get a simple Qt “Hello World” application running on my tablet.My next step was to build the Qwt library and make use of it in my application. I spent some time reading about qmake and I built the library along with an application with no problems but when I run the application it cra
joshi
php porting php4
I am a newbie to php, so pardon me if this email sounds, well… dumb. I am trying to port some php4 code for my boss. Here is this one function that makes me stumped.function dbank($table,$sql,$dbankoverride=””,$dbconfig=””) {if(empty($dbconfig)) $dbconfig=”0″;$dbhostconfig[0]=”XXXX”;$dbuserconfig[0]=”XXXX”;$dbpasswdconfig[0]=”XXXX”;$dbankconfig[0]=”db1″;$dbhostconfig[1]=”YYYY”;$dbuserconfig[1]=”YYYY”;$dbpasswdconfig[1]=””;$dbankconfig[1]=”db2″;$dbhost=$dbhostconfig[$dbconfig];$dbuser=$dbuserco
troyane
osx qt sdl qt-creator porting
My friend and I are porting our software to Mac OSX. The application is heavily built on SDL and we are having a hard time getting SDL linked and compiling in Qt5. We are not using any part of Qt in our code other then using the IDE for cross-platform ease.Currently, I have SDL framework inside /Library/Frameworks/Inside application.pro I have:TEMPLATE = app CONFIG += console CONFIG -= app_bundle CONFIG -= qtSOURCES += main.cppmacx {INCLUDEPATH += “/Library/Frameworks/SDL.framework/headers/” }In
foliveira
c++ arm porting
I’m receiving a SIGILL after running the following code. I can’t really figure what’s wrong with it. The target platform is ARM, and I’m trying to port a known library (in which this code is contained)void convertFloatToFixed(float nX, float nY, unsigned int &nFixed) {short sx = (short) (nX * 32);short sy = (short) (nY * 32);unsigned short *ux = (unsigned short*) &sx;unsigned short *uy = (unsigned short*) &sy;nFixed = (*ux << 16) | *uy; }Any help on it would be greatly apprecia
fen
compilers porting
I had legacy code that was originally build for some quite old version of compiler. We are talking about native code, not managed. Now it is ported to almost newest version of the compiler. Every compile error was fixed and now the product is properly compiling and running.But:although it compiles and even runs… how can I be sure is is working as expected? can I be sure that underlying runtime does not change in a way that it introduces new and unexpected runtime bugs? what are best practices
jweyrich
c linux multithreading synchronization porting
I am migrating an applciation from windows to linux. I am facing problem w.r.t WaitForSingleObject and WaitForMultipleObjects interfacesIn my application I spawn multiple threads where all threads wait for events from parent process or periodically run for every t seconds.How can I implement this in Unix.I have checked pthread_cond_timedwait, but we have to specify absolute time for this.
Alex Reynolds
c++ c porting fseek ftell
In C or C++, the following can be used to return a file size:const unsigned long long at_beg = (unsigned long long) ftell(filePtr); fseek(filePtr, 0, SEEK_END); const unsigned long long at_end = (unsigned long long) ftell(filePtr); const unsigned long long length_in_bytes = at_end – at_beg; fprintf(stdout, “file size: %llu\n”, length_in_bytes);Are there development environments, compilers, or OSes which can return the wrong file size from this code, based on padding or other information that is
Nate Glenn
c++ sockets mingw porting
I am trying to make a C++ library used by one of my classes work on both Windows and Linux (it was designed for Linux). The code for it is here (it’s not large). I am compiling with MinGW on Windows 7 64 bit.I’m running into trouble with HTTPInputStream during the final linking stage. I edited the top of HTTPInputStream.cpp so that the includes look like this:#include <sstream> #include <iostream> #include <cctype> #include <cstdlib> #include <cstring> #include <
Dan Andreatta
c windows gnu porting
I would like to port a few applications that I use on Linux to Windows. In particular I have been working on wdiff. A program that compares the differences word by word of two files.Currently I have been able to successfully compile the program on windows through Cygwin. However, I would like to run the program natively on Windows similar to the Project: UnixUtils.How would I go about porting unix utilities on a windows environment?My possible guess it to manually create the ./configure file so
Dror Cohen
c casting pthreads 32bit-64bit porting
I’m trying to convert some old 32 bit code to 64 bit. One of the more frequent warnings I get is:warning: cast of pointer to integer of different sizethis happens when a function calls pthread_create which accepts a void * for passing data to the new thread. The calling thread puts in that void * an enum (hence the size mismatch in 64bit). Here’s the code:typedef enum { zero, one, two }numbers_e;some_function(…) {numbers_e mydata=zero;…pthread_create(…, (void *)mydata);… }I managed to ov
Flexo
c++ python swig porting symbols
I am trying to use C++ lib with python using SWIG, my problem is that the main class symbol is missing,$ ldd -r -d _rf24.so 2>&1|grep RF24undefined symbol: _ZN4RF24C1Ehh (./_rf24.so)$ objdump -t librf24-bcm.so.1.0 |grep RF24…000032cc g F .text 00000044 _ZN4RF24C1Ehhj000032cc g F .text 00000044 _ZN4RF24C2Ehhj…python exception:ImportError: ./_rf24.so: undefined symbol: _ZN4RF24C1EhhI tried using the lib objs from the original Makefile or tried to compile the
Sean Vaughn
c porting
I am having some trouble dealing with some C code. Can someone explain this syntax:void some_function(Int16 omegaFlag[2][8]) {for(i = 0; i < 2; i++){Int16 *Flag = omegaFlag[i] + 1;for(j = 0; j < k; j++){// do some stuff*Flag++ = some_integer_value;}} }1. Why the parameter Int16 omegaFlag[2][8] passed in some_function() declares index values? How are they helping the code(in general, not specific to this code)? 2. *Flag++ = some_integer_value;: What does this line mean?
bhuvana
linux unix porting
in Linux, am getting error “undefined reference to ‘pathfind’ while linking objects in Makefile. libgen, libposix4 libraries are linked to create executable. These libraries are not present in Linux . This pathfind() function declaration is present in libgen.h in Unix but nowhere in Linux. And am not getting where it is defined in Unix too. I assume that its a library fuction of libgen or libposix4. Is there any equivalent function in Linux or i need to write my own function to acheive the
Quinn Taylor
java objective-c cocoa osx porting
I am working on porting a Java codebase to Cocoa/Objective-C for use on desktop Mac OS X. The Java code has lots and lots of methods with checked exceptions like:double asNumber() throws FooException {… }What’s the best way to represent these in Objective-C? Exceptions or error out-parameters?- (CGFloat)asNumber { … // possibly [FooException raise:format:]; }or- (CGFloat)asNumberError:(NSError **)outError {… }I have the sense that out-errors are generally the better solution for Objective-
bash.d
c++ linux windows porting sfml
As the title says, I have successfully compiled, linked and ran a program made in sfml-1.6 on Linux Mint 14. I used g++ for compiling. However as soon as I moved the source files to Windows and tried to compile to the Windows equivalent of the sfml libraries, it crashes. The program compiles and links just fine but it crashes BEFORE it reaches main. I have made sure I dont have any global objects/variables in my own .h files. But I cannot do it for the sfml library. I suspected that it might be
Idolon
c++ visual-studio segmentation-fault android-ndk porting
I have Visual Studio project which I am porting to android. I am facing a problem of segmentation fault in function calls which resembles the functions below:char* format1(const char* fmt, …) {char* buf = new char[1030];va_list ap;va_start(ap, fmt);vsprintf(buf, fmt, ap);va_end(ap);return buf; }char* format2(const char* fmt, …) {va_list ap;va_start(ap, fmt);char* s = format1(fmt, ap);va_end(ap);return s; }The call to the functions is as below:char* s = format2(“%*.*d”, 8, 8, 9910153);I have
Toon Krijthe
android porting
Yesterday I was doing andoid os porting for x86 Architecture, I followed all the steps given in android open source wesite from building environment, downloading source, and finally building the os for x86 architecture. But while make was going on I got some error that I was not able to resolve.I am getting following error:android4.2/external/llvm/utils/TableGen/X86RecognizableInstr.cpp:270: undefined reference to `llvm::Record::getName() const’ out/host/linux-x86/obj/EXECUTABLES/tblgen_intermed
Pratyush
compiler-errors porting msp430 iar contiki
I am using a MSP-EXP430F5438 board and was trying to port contiki on it using the source code(contiki 2.6) through IAR.I am getting the following errors-Error[Pe020]: identifier “CC2520_IRQ_VECTOR” is undefined E:\PS-1\contiki-2.6\cpu\msp430\cc2520-arch.c 50Error[Pe661]: expected an integer constant E:\PS-1\contiki-2.6\cpu\msp430\cc2520-arch.c 50Error[Pe020]: identifier “DIR” is undefined E:\PS-1\contiki-2.6\cpu\msp430\cc2520-arch.c 67Error[Pe020]: identifier “CC2520_CSN_PIN” is undefined E:\PS-
Mysticial
c++ qt4 porting qt3
I’m updating a code from Qt3 to Qt4. I used qt3to4 porting tool, and it fixed some of my issues. But a few errors are remaining: g++ -m64 -Wl,-O1 -o CONVECTION_DYN_CODE_version_initiale Convection_points.o Convection_points_prof.o glbox.o globjwin.o main.o algebra.o evector.o matrix.o matrix4.o quaternion.o write_binary.o write_binary_normals.o moc_glbox.o moc_globjwin.o -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtOpenGL -lQtGui -lQtCore -lGLU -lglut -lGL -lpthread -lCGAL -fp-model -lbo
user1483294
linux osx porting undefined-symbol
I’m trying to compile a program on MAC OSX, originally written on the Linux OS. It is a big program with several makefiles. I have been working on it for weeks and now cannot seem to figure out why is causing undefined symbols errors. There is one overarching Makefile that calls upon the other makefiles so that the order of compilation is correct.When you compile, it creates static libraries as well as multiple applications. Because this guys is so huge, the program creates these static librarie
user1487551
c++ porting undefined-reference ftdi
I am trying to port an application to drive a device that uses an ftdi2332h chip from windows to linux. I installed the libftd2xx library on an ubuntu 10.04 system per these instructions. When I try to compile any of the sample programs I get the following error://usr/local/lib/libftd2xx.so: undefined reference to `memcpy@GLIBC_2.14′ collect2: ld returned 1 exit statusAny guidelines on how to fix this?thanksf
dipanjan
xcode osx compiler-errors linker-error porting
Currently I am porting a Linux C++ project into Mac OS X 10.7 The problem I am facing now is below-Undefined symbols for architecture i386:”MsSipAgent::GetInstance()”, referenced from:NetworkHandler::Start() in networkhandler.o”MsSipAgent::Initialize(std::string, std::string, std::string, std::string, int)”, referenced from:NetworkHandler::RegisterSip() in networkhandler.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation
Earlz
c++ gcc linker porting
I’ve recently been trying to port a C++ application. I believe I have all of it’s dependencies and such and it all compiles. But then, when it goes to link it I get a lot of weird undefined reference errors. /usr/local/lib/libglibmm-2.4.so.7.0: undefined reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long, std::_Ios_Seekdir)’ /usr/local/lib/libglibmm-2.4.so.7.0: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocat
Tancho
android libcurl porting android-ndk
I am trying to port libCurl to android with SSL support, step one would be to port the curl without ssl support I guess so I started doing that. but I run into a problem.as I read on the dev website and in the Android.mk file, the hard part is configuring the make first. so what I did is : Download Android Source code (and compile it! since some of the intermediate libs are needed) Download cURL unpack curl under : {android_src}/external/curl make the configure script for curl by creating a sh
WilliamKF
sockets tcp porting freebsd connect
I have in my C++ application a failure that arose upon porting to 32 bit FreeBSD 8.1 from 32 bit Linux. I have a TCP socket connection which fails to connect. In the call to connect(), I got an error result with errno == EINVAL which the man page for connect() does not cover.What does this error mean, which argument is invalid? The message just says: “Invalid argument”.Here are some details of the connection:family: AF_INET len: 16 port: 2357 addr: 10.34.49.13It doesn’t always fail though. Th
Okw
openssl porting openwrt
I’m porting a project written in C onto an OpenWRT mipsel system. Cross-compiling and library linking is all fine, the project builds and runs on the mipsel system, but there’s a runtime problem with OpenSSL.Seems that PKCS12_create fails for some yet unknown reason. Here’s what I found out with ERR_print_errors_fp:23502:error:06074079:lib(6):func(116):reason(121):NA:0:TYPE=pbeWithSHA1And40BitRC2-CBC 23502:error:23077073:lib(35):func(119):reason(115):NA:0: 23502:error:2306C067:lib(35):func(108):
WilliamKF
c++ windows linux cygwin porting
I am trying to port a C++ program from Linux to Windows using cygwin. I have it building and linking fine now, but when I launch the program, it exits immediately with an error. When I try it in gdb, I get the following ‘unknown target exception’ result:$ gdb ../../bin/ARCH.cygwin/release/myApp GNU gdb 6.8.0.20080328-cvs (cygwin-special) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This GDB was configured
Mike Broyles
perl apache apache2 porting
I’m still banging my head against the wall with attempting to port a legacy perl application from Apache 1.3.x (and who really knows what version of perl) to RHEL6…which is Apache 2.2.x / perl 5.10.xAt any rate, if there is anyone that knows the equivalent foruse Apache::Constants qw(:common :response);… needs to be refactored to use Apache2 …use Apache2::Const qw(:common :response); <–This is _not_ correct.it looks like there is :common, but :response throws the error: “unknown apach
lcbrevard
porting freebsd endianness configure stack-unwinding
libunwind is available as a package (pkg_add -r libunwind) on FreeBSD 8.1 amd64.It is not available that way on FreeBSD 8.1 i386.When I download from http://www.nongnu.org/libunwind/ I cannot build it.The error is In file included from ptrace/_UPT_elf.c:4: ../include/libunwind_i.h:65:5: error: #error Host has unknown byte-order. * Error code 1This appears to be a ./configure error. Is there a way to force this information at configuration time?
user1584685
c linux porting
I am getting this error while running this command[root@himanshi busybox-1.20.2]# make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- CONFIG_PREFIX=/home/himanshi/beagleboard_xm/target install/home/himanshi/beagleboard_xm/build/busybox-1.20.2/scripts/gcc-version.sh: line 11: arm-unknown-linux-gnueabi-gcc: command not foundCC applets/applets.o/bin/sh: arm-unknown-linux-gnueabi-gcc: command not foundmake[1]: *** [applets/applets.o] Error 127 make: *** [applets_dir] Error 2Infact I am getti
Originally posted 2013-11-27 12:06:25.