Welcome! Log In Create A New Profile

Advanced

Announcement: Errata in Tut102

Posted by lrouxp 
Announcements Last Post
Announcement myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Announcement: Errata in Tut102
February 26, 2007 01:02PM
One errata in Tutorial letter 102 came to our attention. Step 7 on p12 the directory change must be

c:\projects\libs and not c:\projects\libs\utils
iva
Re: Announcement: Errata in Tut102
April 03, 2007 07:48AM
Could announcements like this be kept on the top of the message list?
Its bad enough thtat we are struggling to install the software nevermind tutorials with errors, and esp when its at the bottom of the page not really noticeable
iva
Re: Announcement: Errata in Tut102
April 03, 2007 06:54PM
i wasn't sure what to delete to fix this up after following the wrong instructions , but i'm thinking i might not need to do anything as the utils.dll file was in the c:\projects\lib folder and the tutotial says it should be. Anyways does this file structure look like its right :

c:projects
+ libs
+ dataobjects
+ utils
+ debug
+ icons
+ release

and in the
c:\projects\lib root are files:
dataobjects.dll
libdataobjects.a
libs.pro
libsutils.a
parsed_file
tags
utils.dll
Makefile
Anonymous User
Re: Announcement: Errata in Tut102
April 03, 2007 10:40PM
libs is a subdirectory of c:\projects

dataobjects and utils are subdirectories of libs
There are dataobjects.dll and utils.dll and a libs.pro (project) file and a tags file and a libutils.a file under libs too.

My QIde works perfectly in my XP environment (except with my sliderLCD example, but the lecturer says the settings are in the tut letter - refer to a previous posting)

Just make sure you are using the correct mingW compiler. There are two on the cd. Only one works in building the QIde.
iva
Re: Announcement: Errata in Tut102
April 04, 2007 07:18AM
thanks a mill, i'll check it out when i get home, my indentations seem to have disaapeared after i posted the message but i think they are as you said.

I Installed the mingW compiler from the cd udner the instructions for cos340 which i'm doing too so it was already there so didn't install it again (will have to check when i get home if they are the same - but i seem to remember it was in the same install dir on the cd) where is the 2nd mingW compiler that is not the right one, if you know?

did your install just go smoothly and you followed the instructions on the cd followed by the ones in TL102?
i can compile something basic, like a litle popup window saying hello. but soon as i try put in any of the q libraries i get these segmentation errors when i'm running it (compiles but won't run) OR i can't compile saying invalid reference to qMain

its never taken me so long to install software, i'm to scared to try and uninstall evertyhign and redo it i'm afraid it might cause more havoc if i don't do it 100% right. i have dev c++ installed for cos340 which installed easily but this one has just been a horrible nightmare..confused smiley
avatar Re: Announcement: Errata in Tut102
April 04, 2007 09:24AM
Note: If you need to show indentations or anything in a table (i.e. in a fixed width font) Mac has created tags for us to use: [ code ] at the begining and [ /code ] at the end. Obviously, I had to put spaces in so you could see but it's most useful for putting in code examples. e.g.
int main()
  {
  cout << "Hello World!" << endl;
  return 0;
  }
iva
Re: Announcement: Errata in Tut102
April 04, 2007 10:45AM
thanxsmileys with beer
Re: Announcement: Errata in Tut102
April 05, 2007 04:27PM
My man I cant get the damn software to work after using instructions from lectures still. The installation process doesnt seem to have a problem, i compiled and biuld the libraries BUT WHEN IM DONE INSTALLING I CANT OPEN THE DAMN QIDE!!!! I JUST SEE A SCREEN SPLASH OF QIDE THEN SOME ERROR MESSAGE SAYING "Cannot open QIde.exe" THEN IT CLOSES. PLIZ EMAIL ANY SUGGESTIONS TO muzzi@webmail.co.za
iva
Re: Announcement: Errata in Tut102
April 16, 2007 03:43PM
did you instal from dist install?

on the Tl section 5.2 when you avhe to add the variables. the 2nds LIBS varilable, -lutils , isn't it just supposed to be -utils without the l?????
avatar Re: Announcement: Errata in Tut102
April 16, 2007 10:35PM
Nope, the -l is a command-line switch meaning "use library". There is no space between the switch and the library name
iva
Re: Announcement: Errata in Tut102
April 17, 2007 08:30AM
The wierd thing is the Qide complains if i put in -lutils:

c:\unisa\MinGW\bin\.. \lib\gcc\mingw32\3.4.2\.. \.. \.. \.. \mingw32\bin\Id.exe: cannot find -lutils
collect2:Id returned 1 exit status
.
.
BUT if i run qmake then make on the qt cmd line it works :

C:\unisa\cos311\Lists>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/unisa/cos311/Lists'
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-subsystem,console -o "debug\Lists.exe" debug\lists-example
s.o -L"C:\Qt\4.1.1\lib" -L -lutils -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/unisa/cos311/Lists'


do u think my Qide.bat file is not 100% right? heres my variables

set QTDIR=C:\Qt\4.1.1
set CPPLIBS=C:\projects\libs
set CPPLIBS=%CPPLIBS%;C:\utils
set PATH=C:\Qt\4.1.1\bin
set PATH=%PATH%;C:\unisa\MinGW\bin
set PATH=%PATH%;C:\projects\libs
set PATH=%PATH%;%SystemRoot%\System32
set QMAKESPEC=win32-g++


i ran qmake and make on c:\utils, but i wonder if something is still wrong there, reason being with my qtio project ( where u have to use qstd.h) i don't think it finds the qstd.cpp and .h files in the c:\utils because it throws a bunch of errors all something like :undefined reference to qstd::cout
IT DoES work however, if i add the qstd.cpp and .h files to the project
??
Re: Announcement: Errata in Tut102
April 17, 2007 12:15PM
May I too add my sentiment that it is utterly painful loosing so much time to configure and fix before actually being able to code.

I too have been battling for days to get basics done. Even with the errata mentioned, I get an error when building the Ezust libraries. It does go on to create the utils.dll but I am not convinced about it. Through Qide or running make I get the following error. Has anyone been able to build it without any errors?
Most of the early examples do compile, including the qapp example.

-o debug\stdinreader.o stdinreader.cpp
stdinreader.cpp:5:18: qstd.h: No such file or directory
stdinreader.cpp:8: error: expected namespace-name before ';' token
stdinreader.cpp:8: error: `<type error>' is not a namespace
stdinreader.cpp: In static member function `static bool StdinReader::readPropert
ies(DataObject*)':
stdinreader.cpp:13: error: `qstd' has not been declared
stdinreader.cpp:13: error: `cout' undeclared (first use this function)
stdinreader.cpp:13: error: (Each undeclared identifier is reported only once for
each function it appears in.)
stdinreader.cpp:25: error: `qstd' has not been declared
stdinreader.cpp:26: error: `qstd' has not been declared
stdinreader.cpp:26: error: `cin' undeclared (first use this function)
mingw32-make[2]: *** [debug\stdinreader.o] Error 1
mingw32-make[2]: Leaving directory `C:/projects/libs/dataobjects'
mingw32-make[1]: *** [debug] Error 2
mingw32-make[1]: Leaving directory `C:/projects/libs/dataobjects'
mingw32-make: *** [sub-dataobjects-make_default] Error 2
iva
Re: Announcement: Errata in Tut102
April 17, 2007 01:17PM
i had and still can't include qstd just 'somme' what i've been dong when i need to use qstd is i get it from i can't remember which folder it origianl came from , ( c:\utils or the examples src/libs ? ) anyways get the qstd.h and qstd.cpp and paste tthem into your project folder then "add" them to your project and it should work once you #include <qstd.h> ... if still doesn't work sometimes it the variables that aren't set you ahve to do them , project properties variables tab, add the
INCLUDEPATH value: $$(CPPLIBS)/utils
and
LIBS values: -L$$(CPPLIBS) and -lutils

run CLEAN instead of build (i dunno why but clean seems to fix stuff, or i think sometimes BUILD doesn't always pick up the changes)

if you tried all that does it work now?
Re: Announcement: Errata in Tut102
April 17, 2007 02:19PM
I also I agree, it is very very difficult to get this software running. Instruction on tut letters not helpful. Gettiing help so expensive, I mean internet is still a luxury in this great country. We are working so in short. Lecturers get the message "We don't have time at all" to be wasting trying to install this software instead of studying.
iva
Re: Announcement: Errata in Tut102
April 17, 2007 08:39PM
can anyone shed some light on the -lutils error when compiling? i had it working if i compiled fom the command line but i must have stuffed up something because now it gives the error there too !

c:\unisa\MinGW\bin\.. \lib\gcc\mingw32\3.4.2\.. \.. \.. \.. \mingw32\bin\Id.exe: cannot find -lutils

??
Re: Announcement: Errata in Tut102
April 17, 2007 09:49PM
@Iva

I suggest that you delete your projects\libs folder, extract the tar.gz files, and build again. You should not have to copy qstd.h, the libraries should compile as is. If not, there must be something wrong with you installation. I had the same problem, only installing the correct mingw and re-installing and re-building qt did the trick.

You might have more than one mingw installation, make sure you are using the right one. "g++ -v" will show you which compiler is used (from the command line). If it is the wrong one, check your path variable "echo %path%". You can change it as specified below.

I noticed that you added c:\utils to CPPLIBS, why? Only c:\projects\libs should be in it.

Remember that you can add the variables to always be set (My Computer -> right click -> Properties -> Advanced and then add user variables CPPLIBS etc. This can then be appended to the path variable and then you can run your compiled executables from the command line.
iva
Re: Announcement: Errata in Tut102
April 17, 2007 10:17PM
ugh... i thought there would be an easier way.. thanx hgouh, funny i thought about adding the varable in windows , so thats the same as doing it in your project but pernament right?
Re: Announcement: Errata in Tut102
April 17, 2007 10:42PM
iva Wrote:
-------------------------------------------------------
> ugh... i thought there would be an easier way..
> thanx hgouh, funny i thought about adding the
> varable in windows , so thats the same as doing it
> in your project but pernament right?

Yes it is, but the QIde.bat file will override the settings and it will only be usefull for doing stuff from the command line.

Maybe it would be a good idea to uninstall all your compilers before installing again. Make sure you use the "dist\mingw" version and install the file "install\Qide\gdb-5.2.1-1.exe". Then recompile qt, qt ide and then the libraries.

Good luck.thumbs up
iva
Re: Announcement: Errata in Tut102
April 18, 2007 05:58PM
the honest truth... i'm scared to go uninstall and redo everything in case i mess it up worse eye popping smiley maybe i'll do it after the assignments done, i did go on the advice of installing dist\mingw, which solved all my initial problems , esp just compiling....i think my only problem now it not understanding my LIBS variable -lutils, so i have to include qstd.h and cpp and everything else that comes from utils into every project...
confused smiley
Re: Announcement: Errata in Tut102
April 18, 2007 07:11PM
iva Wrote:
-------------------------------------------------------
> The wierd thing is the Qide complains if i put in
> -lutils:
>
> c:\unisa\MinGW\bin\.. \lib\gcc\mingw32\3.4.2\..
> \.. \.. \.. \mingw32\bin\Id.exe: cannot find
> -lutils
> collect2:Id returned 1 exit status
> .
> .
> BUT if i run qmake then make on the qt cmd line it
> works :
>
> C:\unisa\cos311\Lists>make
> mingw32-make -f Makefile.Debug
> mingw32-make[1]: Entering directory
> `C:/unisa/cos311/Lists'
> g++ -mthreads -Wl,-enable-stdcall-fixup
> -Wl,-enable-auto-import -Wl,-enable-runt
> ime-pseudo-reloc -Wl,-subsystem,console -o
> "debug\Lists.exe" debug\lists-example
> s.o -L"C:\Qt\4.1.1\lib" -L -lutils -lQtGuid4
> -lQtCored4
> mingw32-make[1]: Leaving directory
> `C:/unisa/cos311/Lists'
>

-L"C:\projects\libs" should be in the log above, but it isn't. Maybe your CPPLIBS variable isn't picked up. Did you run this from the QT command line? (if you did you should add cpplibs yourself e.g. CPPLIBS=C:\projects\libs)

Check the log from Qide when compiling and make sure -L"C:\projects\libs" is there as well.

Remember not to add c:\utils to CPPLIBS.
avatar Re: Announcement: Errata in Tut102
April 18, 2007 10:08PM
My Ezust utils compiled correctly first time when I followed the instructions in tut102.

One thing that I'd like to know - since you have problems with -lutils - is how are you entering this into your QIde projects? Are you setting up the project properties for each and every project you want to compile? Is it set to console project? Have you got the INCLUDEPATH variable set and the LIBS variable? Did you put the two LIBS entries on one line or did you click the Plus button twice and put each entry on it's own line (INCLUDEPATH only has one entry)?

Check all these first. If you have to copy/paste/move files around, you've done something wrong. Fix that problem rather than hacking your system - it will come back to bite you.
Re: Announcement: Errata in Tut102
April 19, 2007 04:04PM
I think I know why I was having the -ltuils problem.
I followed the "manual" option of building the libs, and more than likely the errata above caused the failure to build. I had a utils.dll but not in the correct folder.
I eventually uninstalled everything and reinstalled. When I got to the libs I updated the properties in QIde and built them there. This time it compiled without error, only the warnings as specified in the TL.
iva
Re: Announcement: Errata in Tut102
April 19, 2007 07:55PM
thanks guys, robanaurocs : i put the 2 libs variables as separate lines ( used the +) , is that the correct way?
you're right i probably need to install from scratch but until monday when my assignment is submitted i don't wanna chance a reinstall, i got around it by copying everything i need my project folder ( i know its lame ), but just til i get the assignment sub'd i'll do it like that
thanks for all your help guys & gals!
Sorry, only registered users may post in this forum.

Click here to login