Project
The project is to be done in groups of two to four people (we recommend four). You need to form groups yourselves, and to facilitate that there is a discussion "Looking for project group members" in Canvas.
I also answer questions about the project (preferably in Canvas), and I will publish questions of general interest (and the answers) there.
The report is due Wednesday, May 4 2022.
Assignment: create a news system
- The assignment: cppproject.pdf.
Files for the project:
The communication classes are available in the git repo at https://gitlab.com/cs-lth-cpp/clientserver.git
The test clients: TestServer1.jar, TestServer2.jar
Note about submission in SAM
When submitting via SAM, currently you don't seem to go past the "Processing..." page but your submissions are uploaded to the system correctly even if you don't get a receipt.
Submission
Your solution and report is to be submitted through the web interface at sam.cs.lth.se/portal
Under Assignment, choose
Course: EDAF50 - C++-programmering (vt1, 2022)
Assignment: news
1. Under Students, enter the STiL identities of all group members
2. Under Submission content,
- write a brief message that it is your solution to the "news" assignment and the names of all group members
- upload your report and your source code archive
3. Click Submit handin to submit your solution
When your submission has been marked you will receive an email from the system. If asked to make corrections, make a new submission using the above procedure. After the initial submission, the system remembers the group members.
Notes, corrections and comments
Problems building libraries on MacOS
On some versions of the XCode tools, building the library libclientserver.a
with the commands used in the Makefile does not work. Creating the archive with the commands:
ar rv libclientserver.a connection.o server.o
ranlib libclientserver.a
will create an archive file that, when used, gives a linker error like
ld: warning: ignoring file /libclientserver.a, file was built for archive which is not the architecture being linked (x86_64): /libclientserver.a
and a list of undefined symbols.
The fix is to use the tool libtool
instead or ar
and ranlib
:
libtool -static -o libclientserver.a connection.o server.o
UBSan complains on M1 macs
Something in the library functions for getting the IP address for a hostname may cause the undefined behaviour sanitizer to complain about "load of misaligned address" on a Mac with Apple silicon. This can be disregarded.